<script type="text/javascript">
	$(document).ready(function () {
		
		//jCarousel Plugin
	    $('#carousel').jcarousel({
			vertical: true,
			scroll: 1,
			auto: 2,
			wrap: 'last',
			initCallback: mycarousel_initCallback
	   	});

	//Front page Carousel - Initial Setup
   	$('div#slideshow-carousel a img').css({'opacity': '0.5'});
   	$('div#slideshow-carousel a img:first').css({'opacity': '1.0'});
   	$('div#slideshow-carousel li a:first').append('<span class="arrow"></span>')

  
  	//Combine jCarousel with Image Display
    $('div#slideshow-carousel li a').hover(
       	function () {
        		
       		if (!$(this).has('span').length) {
        		$('div#slideshow-carousel li a img').stop(true, true).css({'opacity': '0.5'});
   	    		$(this).stop(true, true).children('img').css({'opacity': '1.0'});
       		}		
       	},
       	function () {
        		
       		$('div#slideshow-carousel li a img').stop(true, true).css({'opacity': '0.5'});
       		$('div#slideshow-carousel li a').each(function () {

       			if ($(this).has('span').length) $(this).children('img').css({'opacity': '1.0'});

       		});
        		
       	}
	).click(function () {

	      	$('span.arrow').remove();        
		$(this).append('<span class="arrow"></span>');
       	$('div#slideshow-main li').removeClass('active');        
       	$('div#slideshow-main li.' + $(this).attr('rel')).addClass('active');	
        	
       	return false;
	});


});


//Carousel Tweaking

function mycarousel_initCallback(carousel) {
	
	// Pause autoscrolling if the user moves with the cursor over the clip.
	carousel.clip.hover(function() {
		carousel.stopAuto();
	}, function() {
		carousel.startAuto();
	});
}
	
	</script>
<?php
$this->pageTitle=Yii::app()->name . ' - Login';
$this->breadcrumbs=array(
	'Login',
);
?>


<div id="content1">
				
				<noscript><div class="noscript"><span class="code-sitename">Slider Kit</span> jQuery plugin requires Javascript activation.</div></noscript>
				
				<!-- Start newslider-minimal -->
				<div class="sliderkit newslider-minimal">						
					<div class="sliderkit-legend">Latest news:</div>
					<div class="sliderkit-panels">
					<?php $posts = Post::model()->findAll('status=2'); ?>
					<?php foreach($posts as $post): ?>
						<div class="sliderkit-panel">
							<?php echo CHtml::link(CHtml::encode($post->title), $post->url,array('title'=>$post->title)); ?>
						</div>
					<?php endforeach; ?>
					</div>
				</div>				
				<!-- // end of newslider-minimal -->

				<!--hahahhahhah-->
				

					<div id="slideshow-main">
					<ul>
					<?php $galeries = Galery::model()->findAll(); ?>
					<?php $i=0; ?>
					<?php foreach($galeries as $galery): ?>
					<li class="<?php echo $galery->id; ?> <?php if($i==0){ echo 'active';}else{} ?>">
					<a href="#">
					<img src="<?php echo Yii::app()->request->baseUrl.'/galery/'.$galery->photo; ?>" width="379" height="192" alt=""/>
					<span class="opacity"></span>
					<span class="content"><h1><?php echo $galery->title; ?></h1><p><?php echo $galery->description; ?></p></span>
					</a>
					</li>
					<?php $i++; ?>
					<?php endforeach; ?>
					</ul>
					</div>
					<div id="slideshow-carousel">
					<ul id="carousel" class="jcarousel jcarousel-skin-tango">
					<?php $galeriess = Galery::model()->findAll(); ?>
					<?php foreach($galeriess as $galer): ?>
					<li><a href="#" rel="<?php echo $galer->id; ?>"><img src="<?php echo Yii::app()->request->baseUrl.'/galery/'.$galer->photo; ?>" width="206" height="95" alt="#"/></a></li>
					<?php endforeach; ?>
					</ul>
					</div>
					<div class="clear"></div>
				
				<!--ahhahhahahhahha end -->
				
				
				<!-- Start newslider-vertical -->
				<div class="portlet-decoration" style="width:567px;"><span class="portlet-title"><b style="color:#fff;">Opo iki yooo</b></span></div>
				<div class="sliderkit newslider-vertical">
					<div class="sliderkit-nav">
						<div class="sliderkit-nav-clip">
							<ul>
								<?php $berita = Post::model()->findAll(); 
								foreach ($berita as $dberita):
								?>
								<li><a href="<?php echo $dberita->url ;?>" title="<?php echo $dberita->title ;?>"><?php echo $dberita->title ;?></a></li>
								<?php endforeach; ?>
							</ul>
						</div>
					</div>
					<div class="sliderkit-panels">
					<?php $berita = Post::model()->findAll(); 
								foreach ($berita as $dberita):
								?>
						<div class="sliderkit-panel">
							<div class="sliderkit-news">
								<a href="<?php echo $dberita->url ;?>" title="<?php echo $dberita->title ;?>"><img src="<?php echo Yii::app()->request->baseUrl."/images/".$dberita->photo; ?>" width="130" height="87" alt="<?php echo $dberita->title ;?>" /></a>
								<h3><a href="<?php echo $dberita->url ;?>"><?php echo $dberita->title ;?></a></h3>
								<p><?php $sub = substr($dberita->content,0,160) ;
								echo $sub;
								?></p>
								<a class="sliderkit-news-readmore" href="<?php echo $dberita->url ;?>">Read more</a>
							</div>
						</div>
						<?php endforeach; ?>
						</div>
					</div>
				<!-- // end of newslider-vertical -->
				

				<!-- Start newslider-horizontal -->
				
				<div class="portlet-decoration" style="width:567px;"><span class="portlet-title"><b style="color:#fff;">Opo iki yooo</b></span></div>
				<div class="sliderkit newslider-horizontal">
					<div class="sliderkit-nav">
						<div class="sliderkit-nav-clip">
							<ul>
								<li><a href="#" title="[link title]">Lorem ipsum dolor</a></li>
								<li><a href="#" title="[link title]">Lorem ipsum dolor est</a></li>
								<li><a href="#" title="[link title]">Lorem ipsum</a></li>
								<li><a href="#" title="[link title]">Lorem ipsum dolor est</a></li>
								<li><a href="#" title="[link title]">Lorem ipsum dolor</a></li>
							</ul>
						</div>
					</div>
					<div class="sliderkit-panels">
						<div class="sliderkit-panel">
							<div class="sliderkit-news">
								<a href="#" title="[Titre de l'article]"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/photos/small/sample-06.jpg" alt="[alternative text]" /></a>
								<h3><a href="#">Lorem ipsum dolor</a></h3>
								<p>Is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took...
								<a class="sliderkit-news-readmore" href="#">Read more</a></p>
							</div>
						</div>
						<div class="sliderkit-panel">
							<div class="sliderkit-news">
								<a href="#" title="[Titre de l'article]"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/photos/small/sample-04.jpg" alt="[alternative text]" /></a>
								<h3><a href="#">Lorem ipsum dolor est</a></h3>
								<p>Is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s...
								<a class="sliderkit-news-readmore" href="#">Read more</a></p>
							</div>
						</div>
						<div class="sliderkit-panel">
							<div class="sliderkit-news">
								<a href="#" title="[Titre de l'article]"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/photos/small/sample-01.jpg" alt="[alternative text]" /></a>
								<h3><a href="#">Lorem ipsum</a></h3>
								<p>Is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took...
								<a class="sliderkit-news-readmore" href="#">Read more</a></p>
							</div>
						</div>
						<div class="sliderkit-panel">
							<div class="sliderkit-news">
								<a href="#" title="[Titre de l'article]"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/photos/small/sample-03.jpg" alt="[alternative text]" /></a>
								<h3><a href="#">Lorem ipsum dolor est</a></h3>
								<p>Is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s...
								<a class="sliderkit-news-readmore" href="#">Read more</a></p>
							</div>
						</div>
						<div class="sliderkit-panel">
							<div class="sliderkit-news">
								<a href="#" title="[Titre de l'article]"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/photos/small/sample-07.jpg" alt="[alternative text]" /></a>
								<h3><a href="#">Lorem ipsum dolor</a></h3>
								<p>Is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took...
								<a class="sliderkit-news-readmore" href="#">Read more</a></p>
							</div>
						</div>
					</div>
				</div>
				
		
				
				<div class="portlet-decoration" style="width:567px;"><span class="portlet-title"><b style="color:#fff;">Opo iki yooo</b></span></div>
				
				<div id="recent">
				<?php
				 $dataProvider=new CActiveDataProvider('Post', array(
				'pagination'=>array(
				'pageSize'=>2,
				  ),
				 ));
				$this->widget('zii.widgets.CListView', array(
					'dataProvider'=>$dataProvider,
					'itemView'=>'_view',
					'template'=>"{items}\n{pager}",
				));  
				?>
				</div>	
				</div>
			
			<div id="sidebar-right">
			<img src="<?php echo Yii::app()->request->baseUrl; ?>/images/a.jpg" />
			<?php $this->widget('EPoll'); ?>
			</div>
			<div class="spacer"></div>




